This section shows the Pascal data structures for the GWorldPtr and GWorldFlags data types. Your application uses pointers of type GWorldPtr to refer to the offscreen graphics worlds it creates. Several routines in this chapter expect or return values defined by the GWorldFlags data type.
An offscreen graphics world in Color QuickDraw contains a CGrafPort record--and its handles to associated PixMap and ColorTable records--that describes an offscreen graphics port and contains references to a GDevice record and other state information. The actual data structure for an offscreen graphics world is kept private to allow for future extensions. However, when your application uses the NewGWorld function to create an offscreen world, NewGWorld returns a pointer of type GWorldPtr by which your application refers to the offscreen graphics world. This pointer is defined as follows:
TYPE GWorldPtr = CGrafPtr;
On computers lacking Color QuickDraw, GWorldPtr points to an extension of the GrafPort record.
Several routines in this chapter expect or return values defined by the GWorldFlags data type, which is defined as follows:
TYPE GWorldFlags =
SET OF (
pixPurge, {specify to NewGWorld to make base address }
{ for offscreen pixel image purgeable}
noNewDevice, {specify to NewGWorld to not create a new }
{ GDevice record for offscreen world}
Note: QuickTime 3 for Windows does not support the noNewDevice flag.
useTempMem, {specify to NewGWorld to create base }
{ address for offscreen pixel image in }
{ temporary memory}
keepLocal, {specify to NewGWorld to keep offscreen }
{ pixel image in main memory}
gWorldFlag4, {reserved}
gWorldFlag5, {reserved}
pixelsPurgeable, {returned by GetPixelsState to indicate }
{ that base address for offscreen pixel }
{ image is purgeable; specify to }
{ SetPixelsState to make base address for }
{ pixel image purgeable}
pixelsLocked, {returned by GetPixelsState to indicate }
{ that base address for offscreen pixel }
{ image is locked; specify to }
{ SetPixelsState to lock base address for }
{ offscreen pixel image}
gWorldFlag8, {reserved}
gWorldFlag9, {reserved}
gWorldFlag10, {reserved}
gWorldFlag11, {reserved}
gWorldFlag12, {reserved}
gWorldFlag13, {reserved}
gWorldFlag14, {reserved}
gWorldFlag15, {reserved}
mapPix, {returned by UpdateGWorld if it remapped }
{ colors to a new color table}
newDepth, {returned by UpdateGWorld if it translated }
{ pixel map to a different pixel depth}
alignPix, {returned by UpdateGWorld if it realigned }
{ pixel image to onscreen window}
newRowBytes, {returned by UpdateGWorld if it changed }
{ rowBytes field of PixMap record}
reallocPix, {returned by UpdateGWorld if it reallocated }
{ base address for offscreen pixel image}
gWorldFlag21, {reserved}
gWorldFlag22, {reserved}
gWorldFlag23, {reserved}
gWorldFlag24, {reserved}
gWorldFlag25, {reserved}
gWorldFlag26, {reserved}
gWorldFlag27, {reserved}
clipPix, {specify to UpdateGWorld to update and clip }
{ pixel image}
stretchPix, {specify to UpdateGWorld to update and }
{ stretch or shrink pixel image}
ditherPix, {specify to UpdateGWorld to dither pixel }
{ image}
gwFlagErr, {returned by UpdateGWorld if it failed}
);